<?php
session_start(); 
include '../connect.php';
mysql_query ('SET NAMES \'UTF8\'');
$id = $_GET['id'];
?>

<!DOCTYPE html> 
<html> 
	<head> 
	<title>[Rec]ON - Votre Article</title> 
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" /> 
	<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css" />
	<link rel="stylesheet" href="themes/recontv-theme.css" />
	<link rel="stylesheet" href="stylesmobile.css" />
	<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
	<script src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script>
	<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
</head> 
<body> 


<div data-role="dialog" id="erreur">

	<div data-role="header">
		<h1>Erreur 404</h1>
	</div><!-- /header -->

	<div data-role="content">	
        <p>La page n'a pas été créée/retrouvée</p>
	</div><!-- /content -->

</div><!-- /page -->

<div data-role="page" id="index">

	<div data-role="header" id="top">
		<a data-role="button" data-icon="search" data-iconpos="notext" data-inline="true" href="#erreur" data-transition="pop"></a>
		<h1>[Rec]ON - Votre Article</h1>
		<a data-role="button" data-icon="home" data-ajax="false" data-iconpos="notext" href="../index.php"></a>
	</div><!-- /header -->
	
	<div data-role="content">
	
		<div data-role="controlgroup" data-type="horizontal" style="margin:auto; width:239px;">
			<a data-role="button" data-icon="video" data-inline="true" data-ajax="false" data-iconpos="left" href="allvideos.php">Vidéos</a>
			<a data-role="button" data-icon="article" data-inline="true" data-ajax="false" data-iconpos="left" href="allarticles.php">Articles</a>
		</div>
		
		<ul data-role="listview" data-inset="true" data-theme="d" data-divider-theme="d">
			<?php	
	
				$result = mysql_query('SELECT titre, contenu FROM reportage WHERE id_reportage="'.$id.'" ORDER BY date DESC LIMIT 0 , 1');

				// Boucle pour afficher les resultats
				while($row = mysql_fetch_row($result)){

			?>
        	<li data-role="list-divider" style="text-align:center;"><?php echo $row[0];?></li>
 			<li class="article"><?php echo $row[1]; }?></li>
		</ul> 			
			
	</div><!-- /content -->
	
	<div data-role="footer">
		<a data-ajax="false" href="allarticles.php" data-role="button" data-icon="back" data-transition="slidedown">Retour</a>
	</div><!-- /content -->

</div><!-- /index -->

</body>
</html>